<style>
.jylabel-switch {padding:0.3rem 0.5rem;}
.jylabel-switch.active{
	border-radius:1.5rem;
	background-color:#00c568;
	color:#fff;
}
</style>
<div class='fui-page-group' ng-if="pagedata.op == 'main'">
<div class='fui-page fui-page-current'>
	<div class='fui-content'>
		<div style="background: {{main.syscolor||'#05c175'}};padding:1rem 0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div class="bold"><i class="icon icon-dianpu" style="color:#f2f2f2"></i> {{pagedata.merch.merchname || '匿名商户'}}</div>
					<div style="font-size:0.6rem">分类:<span class="f60">{{pagedata.category.catename || '无'}}</span></div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:0.7rem;color:#fff;" href="javascript:;" ng-click="access_json('jy_merch/manage.shop/')">
					 <a style="border-radius: 1rem;padding:0.2rem 0.3rem;font-size:0.6rem; background-color: rgb(255, 255, 255, 0.3);;width:auto;color:#fff"><i class="icon icon-qiehuan" style="font-size:0.6rem"></i> 设置</a>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-4" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">今日单额</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.merch.today_money || '0.00'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">今日单量</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.merch.today_num || '0'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">总订单额</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.merch.all_money || '0.00'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:0.7rem;color:#fff">总单量</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.merch.all_num || '0.00'}}</div>
														
													</div>
					</div>
			</div>			
	</div>
	<div style="padding:0.5rem;margin-top:-2.5rem">
		<div class="fui-cell-group fui-cell-click mod-group radius">
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-caifua"></i></div>
								<div class="fui-cell-text">
									<div>总订单额:￥ <span class="red">{{pagedata.merch.all_money || '0.00'}}</span> （可结算:单额￥ <span class="red">{{pagedata.lastget_money || '0.00'}}</span>）</div>
									<div class="subtitle" style="font-size:0.65rem">只能结算已完成的订单！</div>
								</div>
								<div ng-click="access_json('jy_liangoods/merch.apply_add/')" class="fui-cell-remark noremark">
									<span class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">结算</span>
								</div>
					</a>
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-erweima"></i></div>
								<div class="fui-cell-text">
								 我的二维码
								</div>
								<div href="javascript:;" ng-click="pagedata.showyewu=true;pagedata.show_verify();" class="fui-cell-remark">
									查看
								</div>
					</a>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group radius" style="margin-top:0.5rem">
							<a class="fui-cell external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order/')">
								<div class="fui-cell-text bold">我的订单</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">查看我的订单</div>
							</a>
							<div class="fui-icon-group col-5 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order//status=1')">
									<div class="badge" ng-if="pagedata.statics.status1>0">{{pagedata.statics.status1}}</div>
									<div class="icon icon-green radius"><i class="icon icon-daifukuan1"></i></div>
									<div class="text">待拣货</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order//status=2')">
									<div class="badge" ng-if="pagedata.statics.status2>0">{{pagedata.statics.status2}}</div>
									<div class="icon icon-orange radius"><i class="icon icon-daifahuo"></i></div>
									<div class="text">已拣货</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order//status=3')">
									<div class="badge" ng-if="pagedata.statics.status3>0">{{pagedata.statics.status3}}</div>
									<div class="icon icon-blue radius"><i class="icon icon-daishouhuo1"></i></div>
									<div class="text">已审核</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order//status=4')">
									<div class="badge" ng-if="pagedata.statics.status4>0">{{pagedata.statics.status4}}</div>
									<div class="icon icon-blue radius"><i class="icon icon-survey1"></i></div>
									<div class="text">已发货</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.worker_order//status=5')">
									<div class="badge" ng-if="pagedata.statics.status5>0">{{pagedata.statics.status5}}</div>
									<div class="icon icon-pink radius"><i class="icon icon-tuihuanhuo1"></i></div>
									<div class="text">已完成</div>
								</a>
							</div>
		</div>
		<div class="fui-cell-group fui-cell-click mod-group radius">
							<a class="fui-cell external">
								<div class="fui-cell-text bold">我的日常</div>
							</a>
							<div class="fui-icon-group col-4 selecter">
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_liangoods/merch.apply_list/')">
									<div class="icon icon-green radius"><i class="icon icon-yiban"></i></div>
									<div class="text">我的结算</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_merch/manage.printlist/')">
									<div class="icon icon-green radius"><i class="icon icon-print"></i></div>
									<div class="text">默认打印机</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_merch/manage.feiprintlist/')">
									<div class="icon icon-green radius"><i class="icon icon-print"></i></div>
									<div class="text">飞蛾打印机</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_xpyun/print/')">
									<div class="icon icon-green radius"><i class="icon icon-print"></i></div>
									<div class="text">芯烨打印机</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_merch/manage.printer/')">
									<div class="icon icon-green radius"><i class="icon icon-print"></i></div>
									<div class="text">打印任务</div>
								</a>
								<a class="fui-icon-col-sm external" href="javascript:;" ng-click="access_json('jy_merch/manage.printer_log/')">
									<div class="icon icon-green radius"><i class="icon icon-liebiao"></i></div>
									<div class="text">打印日志</div>
								</a>
							</div>
		</div>
		<div class='btn btn-success block' style="margin-top:0.5rem" href="javascript:;" ng-click="access_json('jy_liangoods/merch.peisong_order/')">
			前往抢单>>
		</div>
	</div>
</div>
</div>
<div ng-include="sys_html('merch/_footer')"></div>
<div class="fe-floatright-bottom" style="bottom:5rem">
<a ng-if="pagedata.isopenvoice==1" ng-click="pagedata.isopenvoice=2;pagedata.openvoice(false)" href="javascript:;"><i class="icon icon-nolingsheng0"></i></a>
<a ng-if="pagedata.isopenvoice!=1" ng-click="pagedata.isopenvoice=1;pagedata.openvoice(true)" href="javascript:;"><i class="icon icon-lingsheng0"></i></a> 
</div>
<div ng-if="pagedata.showyewu" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showyewu=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行“用户绑定”操作
				</div>
				<div class='fui-cell' style="padding-bottom:0">
					<div class="fui-cell-text c">
						<div class="img_box" id="show_verify_ewm">
						</div>
					</div>
				</div>
				<div class='fui-cell' style="margin-top:0;padding-top:0">
					<div class="fui-cell-text">
					<div class="error c">
						<p style="padding: 0 1.3rem">温馨提示：提供本二维码给准客户扫码！</p>
					</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworder.mp3"></source>
</audio>
<script>
scope.pagedata.show_verify=function(){
	var url=scope.pagedata.merch.url;
	scope.tool.qr(url,'show_verify_ewm',150)
}
if(scope.main.issetInterval){
	for(var i = 1;i<=20;i++){
		clearInterval(i);
	}
}
scope.pagedata.openvoice=function(type){
	var voicetime = 0;
    var openvoice;
	if(type || scope.pagedata.isopenvoice==1){
		 openvoice = setInterval(() => {
			if(!scope.pagedata.isopenvoice){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_liangoods/merch.index/getnew/',function(res){
						if(res!='none'){
							if(!voicetime[res.id]){
								voicetime[res.id]=1;
								$("#openvoice")[0].play();
							}
						}
			});
			scope.main.issetInterval=1;
		}, 8000);
	}else{
		scope.get('jy_liangoods/merch.index/setopenvoice/isopenvoice=0');
	}
}
scope.pagedata.openvoice();
</script>